
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Linux · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    
    <link rel="prev" href="../zookeeper/about.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    READMI
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../design/design_principle.html">
            
                <a href="../design/design_principle.html">
            
                    
                    设计原则
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../redis/about.html">
            
                <a href="../redis/about.html">
            
                    
                    Redis
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../zookeeper/about.html">
            
                <a href="../zookeeper/about.html">
            
                    
                    Zookeeper
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.5" data-path="about.html">
            
                <a href="about.html">
            
                    
                    Linux
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >Linux</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="linux">Linux</h1>
<h3 id="&#x786C;&#x94FE;&#x63A5;">&#x786C;&#x94FE;&#x63A5;</h3>
<p>&#x547D;&#x4EE4;&#xFF1A;</p>
<p>ln filePath filePath</p>
<p>&#x786C;&#x94FE;&#x63A5;&#x76F8;&#x5F53;&#x4E8E;&#x4E00;&#x4E2A;&#x5185;&#x5B58;&#x5BF9;&#x8C61;&#x4E24;&#x4E2A;&#x53D8;&#x91CF;&#x5F15;&#x7528;&#x3002;&#x5220;&#x9664;&#x5176;&#x4E2D;&#x4E00;&#x4E2A;&#x53D8;&#x91CF;&#x662F;&#x4E0D;&#x4F1A;&#x6709;&#x95EE;&#x9898;&#xFF0C;&#x4FEE;&#x6539;&#x5185;&#x5BB9;&#x5219;&#x4E24;&#x8FB9;&#x6253;&#x5F00;&#x90FD;&#x4F1A;&#x51FA;&#x73B0;&#x4FEE;&#x6539;&#xFF1B;</p>
<h3 id="&#x8F6F;&#x8FDE;&#x63A5;">&#x8F6F;&#x8FDE;&#x63A5;</h3>
<p>&#x547D;&#x4EE4;&#xFF1A;</p>
<p>ln -s filepaht filePath</p>
<p>&#x8F6F;&#x8FDE;&#x63A5;&#x76F8;&#x5F53;&#x4E8E;windows&#x7684;&#x5FEB;&#x6377;&#x65B9;&#x5F0F;&#xFF0C;&#x5982;&#x679C;&#x5220;&#x9664;&#x4E86;&#x539F;&#x6587;&#x4EF6;&#x5219;&#x8F6F;&#x8FDE;&#x63A5;&#x5931;&#x6548;&#xFF1B;</p>
<h3 id="&#x6587;&#x4EF6;&#x5C5E;&#x6027;">&#x6587;&#x4EF6;&#x5C5E;&#x6027;</h3>
<p>&#x547D;&#x4EE4;&#xFF1A;</p>
<p>stat filePath</p>
<p><img src="image-20201018165614257.png" alt="image-20201018165614257"></p>
<h3 id="&#x6587;&#x4EF6;&#x7C7B;&#x578B;">&#x6587;&#x4EF6;&#x7C7B;&#x578B;</h3>
<p>&#x5C5E;&#x6027;&#x7B2C;&#x4E00;&#x5217;&#x5219;&#x4EE3;&#x8868;&#x7C7B;&#x578B;</p>
<p>-&#xFF1A;&#x666E;&#x901A;&#x6587;&#x4EF6;&#xFF08;&#x56FE;&#x7247;&#x3001;&#x53EF;&#x6267;&#x884C;&#x6587;&#x4EF6;&#x3001;&#x6587;&#x672C;&#x7B49;&#xFF09;</p>
<p>d&#xFF1A;&#x76EE;&#x5F55;</p>
<p>l&#xFF1A;&#x8F6F;&#x8FDE;&#x63A5;</p>
<p>b&#xFF1A;&#x5757;&#x6587;&#x4EF6;</p>
<p>c&#xFF1A;&#x5B57;&#x8282;&#x6587;&#x4EF6;</p>
<h3 id="&#x78C1;&#x76D8;&#x6302;&#x8F7D;&#x60C5;&#x51B5;">&#x78C1;&#x76D8;&#x6302;&#x8F7D;&#x60C5;&#x51B5;</h3>
<p>&#x547D;&#x4EE4;&#xFF1A;</p>
<p>df -h</p>
<h3 id="&#x6302;&#x8F7D;">&#x6302;&#x8F7D;</h3>
<p>&#x547D;&#x4EE4;&#xFF1A;</p>
<p>mount &#x8BBE;&#x5907; &#x76EE;&#x5F55;</p>
<h3 id="&#x5378;&#x8F7D;">&#x5378;&#x8F7D;</h3>
<p>&#x547D;&#x4EE4;&#xFF1A; </p>
<p>unmount &#x8BBE;&#x5907; &#x76EE;&#x5F55;</p>
<h3 id="&#x6DFB;&#x52A0;&#x8BBE;&#x5907;">&#x6DFB;&#x52A0;&#x8BBE;&#x5907;</h3>
<p>&#x547D;&#x4EE4;&#xFF1A;</p>
<p>losetup &#x76EE;&#x5F55; &#x8BBE;&#x5907;</p>
<h3 id="&#x67E5;&#x770B;&#x542F;&#x52A8;&#x4F9D;&#x8D56;">&#x67E5;&#x770B;&#x542F;&#x52A8;&#x4F9D;&#x8D56;</h3>
<p>&#x547D;&#x4EE4;&#xFF1A;</p>
<p>ldd &#x6267;&#x884C;&#x7A0B;&#x5E8F;&#x8DEF;&#x5F84; </p>
<p>Linux&#x4E00;&#x5207;&#x7686;&#x6587;&#x4EF6;</p>
<p>1&#x3001;Docker&#x5C31;&#x662F;&#x4E00;&#x4E2A;&#x865A;&#x62DF;&#x6587;&#x4EF6;&#x3002;&#x6302;&#x8F7D;&#x5728;&#x76EE;&#x5F55;&#x4E0B;&#x3002;&#x7136;&#x540E;&#x6267;&#x884C;&#x5176;&#x4E2D;&#x7684;bash&#x3002;&#x4F7F;&#x5176;&#x8BEF;&#x8BA4;&#x4E3A;&#x662F;&#x65B0;&#x73AF;&#x5883;</p>
<p>2&#x3001;&#x5185;&#x6838;&#x4E3A;&#x6BCF;&#x4E2A;&#x8FDB;&#x7A0B;&#x5404;&#x81EA;&#x7EF4;&#x62A4;&#x4E00;&#x4E2A;&#x6570;&#x636E;&#xFF0C;&#x6570;&#x636E;&#x91CC;&#x5305;&#x542B;&#x4E86;&#x8FD9;&#x4E2A;&#x8FDB;&#x7A0B;&#x91CC;&#x7684;fd&#xFF08;&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;&#xFF09;&#xFF0C;fd&#x91CC;&#x7EF4;&#x62A4;&#x4E86;&#x4E00;&#x4E9B;&#x6587;&#x4EF6;&#x7684;&#x504F;&#x79FB;&#x91CF;&#x3001;inode&#x53F7;&#xFF0C;&#x4EE5;&#x53CA;&#x5143;&#x7D20;&#x4FE1;&#x606F;&#xFF1B;</p>
<p>3&#x3001;$$ : &#x5F53;&#x524D;&#x8FDB;&#x7A0B;id&#xFF1B;&#x67E5;&#x770B;&#x5F53;&#x524D;bash&#x7684;&#x8FDB;&#x7A0B;id&#xFF1A; echo $$  &#xFF1B;  $BASHPID</p>
<p>4&#x3001;&#x4EFB;&#x4F55;&#x7A0B;&#x5E8F;&#x90FD;&#x6709; 0&#xFF1A;&#x6807;&#x51C6;&#x8F93;&#x5165; 1&#xFF1A;&#x6807;&#x51C6;&#x8F93;&#x51FA; 2&#xFF1A;&#x62A5;&#x9519;&#x8F93;&#x51FA;</p>
<p>5&#x3001;/proc  &#x76EE;&#x5F55;&#x662F;&#x6620;&#x5C04;&#x5185;&#x6838;&#x4E2D;&#x7684;&#x53D8;&#x91CF;&#x548C;&#x5C5E;&#x6027;&#x4EE5;&#x53CA;&#x72B6;&#x6001;</p>
<p>6&#x3001;/proc/$$/fd &#x5F53;&#x524D;&#x8FDB;&#x7A0B;&#x7684;&#x6240;&#x6709;&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;</p>
<p>7&#x3001;lsof -op $$ &#x67E5;&#x770B;&#x5F53;&#x524D;&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;&#x7684;&#x5C5E;&#x6027;&#x7B49;&#xFF1B;</p>
<p>8&#x3001;&#x91CD;&#x5B9A;&#x5411;&#x64CD;&#x4F5C;&#x7B26;&#xFF1A; ls ./ /&#x4E0D;&#x5B58;&#x5728;&#x7684;&#x6587;&#x4EF6;&#x8DEF;&#x5F84; 1&gt; &#x6587;&#x4EF6; 2&lt;&amp; 1  ( 1&#xFF1A;&#x8F93;&#x51FA;&#x6D41;&#x6307;&#x5411;&#x4E86;&#x6587;&#x4EF6;&#xFF0C;2&#xFF1A;&#x9519;&#x8BEF;&#x8F93;&#x51FA;&#x6D41;&#x6307;&#x5411;&#x4E86;&#x521A;&#x624D;&#x8F93;&#x51FA;&#x6D41;&#x6307;&#x5411;&#x7684;&#x4F4D;&#x7F6E;&#x6587;&#x4EF6;&#xFF1B;&#x6267;&#x884C;&#x4E4B;&#x540E;&#x6587;&#x4EF6;&#x91CC;&#x4F1A;&#x6709;ls &#x6B63;&#x5E38;&#x8F93;&#x51FA;&#x548C;&#x9519;&#x8BEF;&#x8F93;&#x51FA;&#x5185;&#x5BB9;)</p>
<p>&#x4F8B;&#x5982;&#xFF1A;ls ./ /xxxx 1&gt; ls.out 2&lt;$ 1</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../zookeeper/about.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page: Zookeeper">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Linux","level":"1.5","depth":1,"previous":{"title":"Zookeeper","level":"1.4","depth":1,"path":"post/zookeeper/about.md","ref":"post/zookeeper/about.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"post/aboutLinux/about.md","mtime":"2020-10-28T14:08:29.315Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-10-29T08:21:27.014Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

